<template>
	<view class="">
		<!-- 广告图 -->
		<view style="width: 100%;height: 10vh;margin-top: 14px;" class="">
			<img style="width: 100%;height: 100%;border-radius: 15px;"
				src="https://img1.baidu.com/it/u=1176362935,1432244848&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1706547600&t=cc073152959dc4074d0ebeb151da4c2e"
				alt="">
		</view>
		
		<view v-for="(topicSku,indexa) in schoolSkuList" :key="indexa" class="" style="margin-top: 10px;">
			<marketItem :topicSku="topicSku"></marketItem>
		</view>
		
		

	</view>
</template>

<script>
	import marketItem from '../components/marketItem.vue'
	import goodsSwiper from '../../../components/pyh-goodsSwiper/pyh-goodsSwiper.vue'
	export default{
		data(){
			return{
				
				schoolSkuList: [],
				current: 0,
				pages: 1,
			}
		},
		components:{
			marketItem,
			goodsSwiper
		},
		methods:{
			async getSchoolSkuList() {
				if (this.current < this.pages) {
					this.current++
					console.log(this.current);
					let form = {
						current: this.current,
						size: 3,
						source: 3
					}
			
					let result = await this.$u.api.getTopicSku(form);
			
			
					this.pages = result.pages
			
					this.schoolSkuList = this.schoolSkuList.concat(result.records);
				
			
			
				} else {
					console.log("没有数据了");
				}
			
			
			}
		},
		mounted() {
		
			this.getSchoolSkuList()
		},
	}
</script>


<style>
</style>